import request from '@/utils/request'

/**
 * 仓库列表
 * /shesd-asset/api/v1/asset/category
 *
 * @param data
 */
export function getWarehouseList(data: any) {
  return request({
    url: '/zgyp-recycle/api/v1/warehouse/page',
    method: 'post',
    data,
  })
}

/**
 * 可用仓库列表
 * /shesd-asset/api/v1/asset/category
 *
 * @param data
 */
export function getEnableWarehouseList(data: any) {
  return request({
    url: '/zgyp-recycle/api/v1/warehouse/pageEnable',
    method: 'post',
    data,
  })
}

/**
 * 新增仓库
 *
 *
 * @param data
 */
export function saveWarehouse(data: any) {
  return request({
    url: '/zgyp-recycle/api/v1/warehouse/save',
    method: 'post',
    data,
  })
}

/**
 *
 * 修改仓库
 * @param data
 */
export function updateWarehouse(data: any) {
  return request({
    url: `/zgyp-recycle/api/v1/warehouse/update`,
    method: 'put',
    data,
  })
}

/**
 *
 * 仓库详情
 * @param params
 */
export function detailWarehouse(params: any) {
  return request({
    url: `/zgyp-recycle/api/v1/warehouse/detail`,
    method: 'get',
    params,
  })
}
/**
 * 仓库删除
 * /shesd-asset/api/v1/asset/category/{ids}
 */
export function delWarehouse(data: any) {
  return request({
    url: `/zgyp-recycle/api/v1/warehouse/del`,
    method: 'delete',
    data,
  })
}
